package com.longteng.lesson2.domain;

import com.longteng.lesson2.service.BookingService;
import com.longteng.lesson2.service.impl.CtripBookingServiceImpl;
import com.longteng.lesson2.service.impl.ElongBookingServiceImpl;
import com.longteng.lesson2.service.impl.FliggyBookingServiceImpl;
import com.longteng.lesson2.service.impl.TongchengBookingServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;

/**
 * Created by li
 * DATE : 2018/12/9 0009
 * TIME : 22:58
 * PROJECT : java-lesson
 * PACKAGE : com.longteng.lesson
 *
 * @author <a href="mailto:55324936@qq.com">li</a>
 */
public class BigBoss {

    BigBoss(){}
    @Autowired
    private ElongBookingServiceImpl elongBookingService;
    @Autowired //通过构造方法注入
    BigBoss(ElongBookingServiceImpl elongBookingService){
        this.elongBookingService =elongBookingService;
    }

    @Autowired //通过成员变量注入属性
    private FliggyBookingServiceImpl fliggyBookingService;

    private CtripBookingServiceImpl ctripBookingService;
    //通过方法注入属性
    @Autowired
    public void setCtripBookingService(CtripBookingServiceImpl ctripBookingService) {
        this.ctripBookingService = ctripBookingService;
    }

    private TongchengBookingServiceImpl tongchengBookingService;


    public FliggyBookingServiceImpl getFliggyBookingService() {
        return fliggyBookingService;
    }

    public void setFliggyBookingService(FliggyBookingServiceImpl fliggyBookingService) {
        this.fliggyBookingService = fliggyBookingService;
    }

    public CtripBookingServiceImpl getCtripBookingService() {
        return ctripBookingService;
    }

    public TongchengBookingServiceImpl getTongchengBookingService() {
        return tongchengBookingService;
    }

    public void setTongchengBookingService(TongchengBookingServiceImpl tongchengBookingService) {
        this.tongchengBookingService = tongchengBookingService;
    }

    public ElongBookingServiceImpl getElongBookingService() {
        return elongBookingService;
    }
    @Autowired
    public void setElongBookingService(ElongBookingServiceImpl elongBookingService) {
        this.elongBookingService = elongBookingService;
    }

    /**
     * 订机票2
     * */
    public void booking(){
        //这里面是不知道进来的是携程或者飞猪或者其他
        //我是不需要做任何修改的
        //减少维护，代码更灵活，低耦合，扩展性更强
        System.out.println();
    }
}
